@using Microsoft.AspNetCore.Identity
@inject SignInManager<PersonModel> SignInManager
@inject UserManager<PersonModel> UserManager

@model Blogs.LazyFox.Models.BlogModel

@{
    ViewData["Title"] = "Create";
}
<script asp-src-include="~/lib/tinymce/tinymce.min.js"></script>

<script>
    tinymce.init({
        selector: '#Article', 
    });
</script>

<form asp-action="Create" method="post">
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <div class="form-group">
        <label asp-for="Title" class="control-label"></label>
        <input asp-for="Title" class="form-control" />
        <span asp-validation-for="Title" class="text-danger"></span>
    </div>
    <div class="form-group">
        <label asp-for="Introduction" class="control-label"></label>
        <input asp-for="Introduction" class="form-control" />
        <span asp-validation-for="Introduction" class="text-danger"></span>
    </div>
    <div class="form-group">
        <label asp-for="Article" class="control-label"></label>
        @* <input asp-for="Article" class="form-control"/> *@
        <textarea asp-for="Article" class="form-control" style="min-height: 70vh;"></textarea>
        <span asp-validation-for="Article" class="text-danger"></span>
    </div>

    <div class="form-group">
        <input type="submit" value="Create" class="btn btn-primary" />
    </div>
</form>


<div>
    <a asp-action="Index">Back to Index</a>
</div>

@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
